

#ifndef __UcGiStyleAttributes_H_Defined__
#define __UcGiStyleAttributes_H_Defined__

#include "zAcGiLineAttributes.h"



class ZSOFT_NO_VTABLE UcGiStyleAttributes
{
public:
	enum AttributeFlags{
		kNothing								= 0x00,
		kColor      							= 0x01,
		kLine       							= 0x02,
		kLineType                               = 0x04,
		kPlotStyle                              = 0x08,
		kEverything                             = 0x0F
	}; 
    UcGiStyleAttributes()   { }
    UcGiStyleAttributes(const UcGiStyleAttributes& source);
    virtual ~UcGiStyleAttributes()  { }

    UcCmEntityColor& getColorAttribute();
    const UcCmEntityColor& getColorAttribute() const;
    void setColorAttribute(const UcCmEntityColor& color);
    UcDbObjectId linetypeObjectId() const;
    void setLinetypeObjectId(const UcDbObjectId& newId);
    UcDbObjectId plotStyleNameId() const;
    void setPlotStyleName(const UcDbObjectId& newId);
	virtual UcGiLineAttributes* getLineAttribute()                              = 0;
    virtual const UcGiLineAttributes* getLineAttribute() const                  = 0;
    virtual void setLineAttribute(const UcGiLineAttributes* pLineAttributes)    = 0;

    virtual void EnsureColorVisibility (UcCmEntityColor& color)	                = 0;	

protected:
    
	UcCmEntityColor m_colorAttribute;

    UcDbObjectId    m_idLinetype;
    UcDbObjectId    m_idPlotstyle;
};

inline
UcGiStyleAttributes::UcGiStyleAttributes(
	const UcGiStyleAttributes& source) 
{
	m_colorAttribute = source.getColorAttribute();
    m_idLinetype = source.linetypeObjectId();
    m_idPlotstyle = source.plotStyleNameId();
}

inline
UcCmEntityColor& 
UcGiStyleAttributes::getColorAttribute()
{ 
    return m_colorAttribute; 
}

inline
const UcCmEntityColor& 
UcGiStyleAttributes::getColorAttribute() const
{ 
    return m_colorAttribute; 
}

inline 
void	
UcGiStyleAttributes::setColorAttribute (
	const UcCmEntityColor& color) 
{
	m_colorAttribute = color; 
}

inline
UcDbObjectId
UcGiStyleAttributes::linetypeObjectId() const
{
    return m_idLinetype;
}

inline
void
UcGiStyleAttributes::setLinetypeObjectId(const UcDbObjectId& newId)
{
    m_idLinetype = newId;
}

inline
UcDbObjectId
UcGiStyleAttributes::plotStyleNameId() const
{
    return m_idPlotstyle;
}

inline
void
UcGiStyleAttributes::setPlotStyleName(const UcDbObjectId& newId)
{
    m_idPlotstyle = newId;
}

#endif 